package logica;

import java.util.HashMap;

public class MazoHelper {
	
	private HashMap<String, Integer> valoresPokerValoresJuego;
	
	private final int MAZO_LENGTH = 52;
	private final int PALOS_LENGTH = 4;
	
	private final String CORAZONES = "Corazones"; 
	private final String DIAMANTES = "Diamantes";
	private final String TREBOLES = "Treboles";
	private final String PICAS = "Picas";
	
	private final String J = "J";
	private final String Q = "Q";
	private final String K = "K";
	
	private final String[] SIMBOLOS_POKER = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", J, Q, K};
	private final String[] PALOS = {CORAZONES, DIAMANTES, TREBOLES, PICAS};
	
	private boolean esLetra(String simboloActual) {
		return simboloActual == this.J || simboloActual == this.Q || simboloActual == this.K;
	}
	
	public MazoHelper() {
		this.valoresPokerValoresJuego = new HashMap<String, Integer>();
		
		for(int i = 0; i < this.SIMBOLOS_POKER.length; i++) {
			String simboloActual = this.SIMBOLOS_POKER[i];
			int value = this.esLetra(simboloActual) ? i : i + 1; 
			this.valoresPokerValoresJuego.put(simboloActual, value);
		}
	}

	public HashMap<String, Integer> getValoresPokerValoresJuego() {
		return valoresPokerValoresJuego;
	}

	public int getMAZO_LENGTH() {
		return MAZO_LENGTH;
	}

	public int getPALOS_LENGTH() {
		return PALOS_LENGTH;
	}

	public int getVALUES_LENGTH() {
		return this.SIMBOLOS_POKER.length;
	}

	public String[] getSIMBOLOS_POKER() {
		return SIMBOLOS_POKER;
	}

	public String[] getPalos() {
		return PALOS;
	}
	
	
}
